
import * as React from "react";
import * as marked from 'marked';
import * as hljs from 'highlight.js';

import './help.less';
import 'highlight.js/styles/atelier-heath-light.css'

marked.setOptions({
  highlight: function (code) {
    return hljs.highlightAuto(code).value;
  }
});

function Help() {
  const markdown = function () {
    var request = new XMLHttpRequest()
    request.open('GET', 'http://45.40.244.50/auth/README.md', false)
    request.overrideMimeType('text/plain');
    request.send(null)
    return request.responseText
  }
  return (<div className="help" dangerouslySetInnerHTML={{ __html: marked(markdown())}}></div>);
}

export default Help